﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wise.Application.Entity;

namespace Wise.Entities
{

    /// <summary>
    /// 自定义主键名称类型
    /// </summary>
    public class MyIdNameItem: IIdNameEntity
    {

        /// <summary>
        /// 主键
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 简称
        /// </summary>
        public string ShortName { get; set; }
    }

    /// <summary>
    /// Id 编码
    /// </summary>
    public class MyIdCodeItem : IIdEntity
    {

        /// <summary>
        /// 主键
        /// </summary>
        public string Id { get; set; }


        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }
    }

    /// <summary>
    /// 带有子级的主键名称类型(泛型)
    /// </summary>
    public class _MyIdNameChildrenItem<TITem>
        : MyIdNameItem
    {
        /// <summary>
        /// 子级
        /// </summary>
        public List<TITem> Children { get; set; }

        /// <summary>
        /// 上级Id
        /// </summary>
        public string ParentId { get; set; }

        /// <summary>
        /// 上级名称
        /// </summary>
        public string ParentName { get; set; }
    }

    /// <summary>
    /// 带有子级的主键名称类型
    /// </summary>
    public class MyIdNameChildrenItem:_MyIdNameChildrenItem<MyIdNameChildrenItem>
    {

    }
}
